<html xmlns:th="http://www.thymeleaf.org">
<header>
	<link rel="stylesheet" type="text/css"
		  href="webjars/bootstrap/3.3.7/css/bootstrap.min.css"/>

	<link rel="stylesheet" th:href="@{/css/main.css}"
		  href="../../css/main.css"/>
	<script type="text/javascript" src="webjars/jquery/2.1.4/jquery.min.js"></script>
	<script type="text/javascript"
			src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<script th:src="@{/js/log.js}"></script>
</header>
<div class="hide">

</div>
<div class="users_list" xmlns:th="http://www.thymeleaf.org" th:fragment="users_list">
	<ul class="nav nav-tabs">
		<li class="active"><a href="##">技术部工时</a></li>
		<li><a href="##">明日计划</a></li>
		<li><a href="##">客服日报</a></li>
	</ul>
	<div class="pull-right">
		<!-- Button -->
		<div class="control-group" style="padding: 10px;">
			<div class="controls">
				<button id="x" name="x"
						class="btn btn-primary" onclick="addtr();">添加一行
				</button>
			</div>
		</div>
	</div>
	<form id="log-form">
		<table id='table-sendlog' class='table table-striped content' data-toggle='table'
			   style='margin: 0px 10px 0px 10px;'
			   data-sort-name='users_sort' data-sort-order='asc'
			   xmlns:th='http://www.w3.org/1999/xhtml'>
			<thead>
			<tr>
				<th data-field='time' data-sortable='true'>日期</th>
				<th data-field='projectName' data-sortable='true'>项目名称</th>
				<th data-field='contentType' data-sortable='true'>工作类型</th>
				<th data-field='duration' data-sortable='true'>时长(小时)</th>
				<th data-field='content' data-sortable='true'>工作内容</th>
				<th data-field='status' data-sortable='true'>工作状态</th>
				<th data-field='remark' data-sortable='true'>备注</th>
				<th class='text-center'>操作</th>
			</tr>
			</thead>
			<tbody class='searchable user_tbody'
				   th:attr="data-projectNameList=${projectNameList},data-contentTypeList=${contentTypeList},data-statusList=${statusList}">
			<tr id="row-template" class='row_main_info hide'>
				<td class='col-xs-1'>
					<div class='date form_datetime controls' data-date='2013-05-10'>
						<input placeholder='开始时间' type='text' class='form-control input-sm' value=''
							   id='starttime'/>
					</div>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='projectName' id='projectName' class='form-control input-sm'>
							<option value='-1' selected='selected'>项目名称</option>
							<option th:object="${pn}" th:each='pn : ${projectNameList}'
									th:value='*{id}' th:text='*{dictDataName}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='contentType' id='contentType' class='form-control input-sm'>
							<option value='-1' selected='selected'>工作类型</option>
							<option th:each='ct : ${contentTypeList}' th:value='${ct.id}'
									th:text='${ct.dictDataName}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-1'>
					<input id='duration' name='duration' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-4'>
					<input id='content' name='content' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='status' id='status' class='form-control input-sm'>
							<option value='-1' selected='selected'>工作状态</option>
							<option th:each='status : ${statusList}' th:value='${status.id}'
									th:text='${status.value}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-2'>
					<input id='remark' name='remark' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-1 icons_collumn'>
					<a class='btn btn-primary' aria-hidden='true' data-target='#modal-User'
					   data-toggle='modal'
					>编辑</a>
					<a class='btn btn-danger' aria-hidden='true' data-target='#modal-DeleteUser'
					   th:attr='data-user-id=*{id}' data-toggle='modal'
					>删除</a>
				</td>
			</tr>
			<tr class='row_main_info'>
				<td class='col-xs-1'>
					<div class='date form_datetime controls' data-date='2013-05-10'>
						<input placeholder='开始时间' type='text' class='form-control input-sm' value=''
							   id='starttime'/>
					</div>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='projectName' id='projectName' class='form-control input-sm'>
							<option value='-1' selected='selected'>项目名称</option>
							<option th:object="${pn}" th:each='pn : ${projectNameList}'
									th:value='*{id}' th:text='*{dictDataName}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='contentType' id='contentType' class='form-control input-sm'>
							<option value='-1' selected='selected'>工作类型</option>
							<option th:each='ct : ${contentTypeList}' th:value='${ct.id}'
									th:text='${ct.dictDataName}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-1'>
					<input id='duration' name='duration' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-4'>
					<input id='content' name='content' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-1'>
					<div>
						<select name='status' id='status' class='form-control input-sm'>
							<option value='-1' selected='selected'>工作状态</option>
							<option th:each='status : ${statusList}' th:value='${status.id}'
									th:text='${status.value}'></option>
						</select>
					</div>
				</td>
				<td class='col-xs-2'>
					<input id='remark' name='remark' type='text' placeholder=''
						   class='form-control'/>
				</td>
				<td class='col-xs-1 icons_collumn'>
					<a class='btn btn-primary' aria-hidden='true' data-target='#modal-User'
					   data-toggle='modal'
					>编辑</a>
					<a class='btn btn-danger' aria-hidden='true' data-target='#modal-DeleteUser'
					   th:attr='data-user-id=*{id}' data-toggle='modal'
					>删除</a>
				</td>
			</tr>
			</tbody>
			<input class='hidden' id='total' name='total' th:value='${total}'/>
		</table>
		<button class="btn btn-info" type="submit">Submit</button>
	</form>
	<script type="text/javascript">

		$(document).ready(function () {
			enableListener();
			enableSubmitEvent();

		});
		//		$('#starttime').datetimepicker({
		//			minView: 'month', //选择日期后，不会再跳转去选择时分秒
		//			format: 'yyyy-mm-dd', //选择日期后，文本框显示的日期格式
		//			weekStart: 1,
		//			language: 'zh-CN', //汉化
		//			todayBtn: 'linked',
		//			autoclose: true //选择日期后自动关闭
		//		}).show();
	</script>
</div>
</html>